package com.ghpt.service.impl;

import com.ghpt.mapper.DianJieCaoMapper;
import com.ghpt.pojo.DianJieCao;
import com.ghpt.service.DianJieCaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DianJieCaoServiceImpl implements DianJieCaoService {
    @Autowired
    private DianJieCaoMapper dianJieCaoMapper;

    @Override
    public DianJieCao findDianJieCaoById(Long id) {
        if (id != null) {
            return dianJieCaoMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(DianJieCao dianJieCao) {
        return dianJieCaoMapper.updateById(dianJieCao);//更新成功为1否则为0
    }
}
